<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>一体化作战平台 - 系统设置</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#0066cc',
                        secondary: '#0099cc',
                        success: '#009966',
                        warning: '#ff9900',
                        danger: '#cc3300',
                        info: '#3182ce',
                        neutral: {
                            100: '#f5f7fa',
                            200: '#e4e7ed',
                            300: '#c0c4cc',
                            400: '#909399',
                            500: '#606266',
                            600: '#303133',
                            700: '#1f2937',
                        }
                    }
                }
            }
        }
    </script>
    
    <style>
        .setting-card {
            transition: all 0.3s ease;
        }
        .setting-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
        }
        
        /* 滑块样式 */
        .slider::-webkit-slider-thumb {
            appearance: none;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #0066cc;
            cursor: pointer;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }
        
        .slider::-webkit-slider-thumb:hover {
            background: #0052a3;
            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
        }
        
        .slider::-moz-range-thumb {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            background: #0066cc;
            cursor: pointer;
            border: none;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }
        
        .slider::-moz-range-thumb:hover {
            background: #0052a3;
            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
        }
        
        .slider::-webkit-slider-runnable-track {
            background: linear-gradient(to right, #0066cc 0%, #0066cc var(--value), #e4e7ed var(--value), #e4e7ed 100%);
            height: 8px;
            border-radius: 4px;
        }
        
        .slider::-moz-range-track {
            background: #e4e7ed;
            height: 8px;
            border-radius: 4px;
        }
    </style>
</head>
<body class="bg-neutral-100 font-sans text-neutral-600 min-h-screen flex flex-col">
    <!-- 顶部导航栏 -->
    <header class="bg-white shadow-sm fixed top-0 left-0 right-0 z-50">
        <div class="flex items-center justify-between px-4 py-3">
            <div class="flex items-center space-x-3">
                <div class="w-10 h-10 bg-primary rounded-md flex items-center justify-center text-white">
                    <i class="fa fa-bank text-xl"></i>
                </div>
                <h1 class="text-xl font-bold text-neutral-700 hidden md:block">一体化作战平台</h1>
            </div>
            
            <div class="hidden md:flex relative flex-1 max-w-md mx-4">
                <input type="text" placeholder="搜索设置..." 
                    class="w-full pl-10 pr-4 py-2 rounded-md border border-neutral-200 focus:outline-none focus:ring-2 focus:ring-primary/30">
                <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-neutral-400"></i>
            </div>
            
            <div class="flex items-center space-x-4">
                <button class="relative p-2 rounded-full hover:bg-neutral-100">
                    <i class="fa fa-bell-o text-lg text-neutral-600"></i>
                    <span class="absolute top-0 right-0 w-2 h-2 bg-danger rounded-full"></span>
                </button>
                <div class="flex items-center space-x-2">
                    <img src="https://picsum.photos/id/1005/200/200" alt="用户头像" class="w-8 h-8 rounded-full">
                    <span class="hidden md:block text-sm font-medium text-neutral-700">张三</span>
                </div>
            </div>
        </div>
    </header>

    <div class="flex pt-16 flex-1">
        <!-- 左侧导航菜单 -->
        <aside class="w-16 md:w-64 bg-white shadow-sm fixed h-full left-0 top-16 overflow-y-auto scrollbar-hide transform md:transform-none transition-transform duration-300 z-40 -translate-x-full md:translate-x-0">
            <nav class="py-4">
                <ul>
                    <!-- 主导航项 -->
                    <li class="mb-1">
                        <a href="index.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-tachometer text-lg"></i>
                            <span class="hidden md:block">首页</span>
                        </a>
                    </li>
                    
                    <!-- 交付流程模块 -->
                    <li class="mb-1">
                        <a href="business_strategy.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-line-chart text-lg"></i>
                            <span class="hidden md:block">业务战略</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="architecture-management.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-sitemap text-lg"></i>
                            <span class="hidden md:block">架构管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="requirementsManagement.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-list-alt text-lg"></i>
                            <span class="hidden md:block">需求管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <div class="design-menu-wrapper">
                            <div class="flex items-center justify-between px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                                <a href="design_management.html" class="flex items-center space-x-3 flex-1" onclick="event.stopPropagation();">
                                    <i class="fa fa-paint-brush text-lg"></i>
                                    <span class="hidden md:block">设计管理</span>
                                </a>
                                <button id="design-menu-toggle" class="hidden md:block p-1 hover:bg-neutral-200 rounded transition-all" aria-label="展开/收起子菜单" onclick="event.stopPropagation();">
                                    <i class="fa fa-chevron-right text-xs transform transition-transform duration-300"></i>
                                </button>
                            </div>
                            <!-- 下拉子菜单 -->
                            <div id="design-submenu" class="hidden overflow-hidden transition-all duration-300 ease-in-out">
                                <div class="bg-neutral-50 py-1">
                                    <a href="interface_management.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-plug text-sm"></i>
                                        <span class="hidden md:block">接口管理</span>
                                    </a>
                                    <a href="model_management.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-cubes text-sm"></i>
                                        <span class="hidden md:block">模型管理</span>
                                    </a>
                                    <a href="data_management.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-database text-sm"></i>
                                        <span class="hidden md:block">字典管理</span>
                                    </a>
                                    <a href="ui_management.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-desktop text-sm"></i>
                                        <span class="hidden md:block">差异分析</span>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </li>
                    
                    <li class="mb-1">
                        <a href="schedule_management.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-calendar text-lg"></i>
                            <span class="hidden md:block">排期管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="developmentMage.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-code text-lg"></i>
                            <span class="hidden md:block">开发管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <div class="test-menu-wrapper">
                            <div class="flex items-center justify-between px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                                <a href="testManagement.html" class="flex items-center space-x-3 flex-1" onclick="event.stopPropagation();">
                                    <i class="fa fa-bug text-lg"></i>
                                    <span class="hidden md:block">测试管理</span>
                                </a>
                                <button id="test-menu-toggle" class="hidden md:block p-1 hover:bg-neutral-200 rounded transition-all" aria-label="展开/收起子菜单" onclick="event.stopPropagation();">
                                    <i class="fa fa-chevron-right text-xs transform transition-transform duration-300"></i>
                                </button>
                            </div>
                            <!-- 下拉子菜单 -->
                            <div id="test-submenu" class="hidden overflow-hidden transition-all duration-300 ease-in-out">
                                <div class="bg-neutral-50 py-1">
                                    <a href="test_cases.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-file-text-o text-sm"></i>
                                        <span class="hidden md:block">测试案例</span>
                                    </a>
                                    <a href="test_plans.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-calendar-check-o text-sm"></i>
                                        <span class="hidden md:block">测试计划</span>
                                    </a>
                                    <a href="test_reports.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-bar-chart text-sm"></i>
                                        <span class="hidden md:block">测试报告</span>
                                    </a>
                                    <a href="test_global_settings.html" class="flex items-center space-x-3 px-4 py-2 pl-12 text-neutral-600 hover:bg-primary/5 hover:text-primary transition-all text-sm">
                                        <i class="fa fa-cogs text-sm"></i>
                                        <span class="hidden md:block">全局设置</span>
                                    </a>
                                </div>
                            </div>
                        </div>
                    </li>
                    
                    <li class="mb-1">
                        <a href="production_workflow.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-rocket text-lg"></i>
                            <span class="hidden md:block">投产上线</span>
                        </a>
                    </li>
                    
                    <!-- 新增的三个子菜单项 -->
                    <li class="mb-1">
                        <a href="quality_management.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-check-circle text-lg"></i>
                            <span class="hidden md:block">质量管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="security_management.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-shield text-lg"></i>
                            <span class="hidden md:block">安全管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="efficiency_metrics.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-bar-chart text-lg"></i>
                            <span class="hidden md:block">效能度量</span>
                        </a>
                    </li>
                    
                    <!-- 分隔线 -->
                    <li class="my-2">
                        <div class="border-t border-neutral-200 mx-4"></div>
                    </li>
                    
                    <!-- 公共模块 -->
                    <li class="mb-1">
                        <a href="teamManagement.html" class="flex items-center space-x-3 px-4 py-3 text-neutral-600 hover:bg-neutral-50 transition-all-300">
                            <i class="fa fa-users text-lg"></i>
                            <span class="hidden md:block">团队管理</span>
                        </a>
                    </li>
                    
                    <li class="mb-1">
                        <a href="settings.html" class="flex items-center space-x-3 px-4 py-3 text-primary bg-primary/5 border-r-4 border-primary">
                            <i class="fa fa-cog text-lg"></i>
                            <span class="hidden md:block font-medium">设置</span>
                        </a>
                    </li>
                </ul>
            </nav>
        </aside>

        <!-- 主内容区域 -->
        <main class="flex-1 ml-16 md:ml-64 p-4 md:p-6 bg-neutral-100 min-h-screen">
            <!-- 面包屑导航 -->
            <div class="mb-6">
                <nav class="flex">
                    <ol class="inline-flex items-center space-x-3">
                        <li>
                            <a href="index.html" class="text-sm font-medium text-neutral-500 hover:text-primary">
                                <i class="fa fa-home mr-2"></i>首页
                            </a>
                        </li>
                        <li>
                            <i class="fa fa-chevron-right text-neutral-400 text-xs mx-2"></i>
                            <span class="text-sm font-medium text-primary">设置</span>
                        </li>
                    </ol>
                </nav>
            </div>

            <!-- 页面标题 -->
            <div class="mb-6">
                <h2 class="text-2xl font-bold text-neutral-700">设置</h2>
                <p class="text-neutral-500 text-sm mt-1">配置和管理您的平台设置</p>
            </div>

            <!-- Tab页签导航 -->
            <div class="bg-white rounded-lg shadow-md mb-6">
                <div class="flex border-b border-neutral-200">
                    <button id="tab-global" class="tab-button flex-1 px-6 py-4 text-sm font-medium text-primary border-b-2 border-primary bg-primary/5 transition-all-300" onclick="switchTab('global')">
                        <i class="fa fa-globe mr-2"></i>全局设置
                    </button>
                    <button id="tab-feature" class="tab-button flex-1 px-6 py-4 text-sm font-medium text-neutral-600 hover:text-primary hover:bg-neutral-50 transition-all-300" onclick="switchTab('feature')">
                        <i class="fa fa-cogs mr-2"></i>功能设置
                    </button>
                </div>
            </div>

            <!-- 全局设置内容 -->
            <div id="content-global" class="tab-content">
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
                    <!-- 参数管理 -->
                    <div class="setting-card bg-white rounded-lg shadow-md p-6 cursor-pointer border-l-4 border-secondary" onclick="window.location.href='#parameters'">
                        <div class="flex items-start justify-between mb-4">
                            <div class="flex items-center space-x-3">
                                <div class="w-10 h-10 bg-secondary/10 rounded-lg flex items-center justify-center text-secondary flex-shrink-0">
                                    <i class="fa fa-sliders text-xl"></i>
                                </div>
                                <h3 class="text-lg font-semibold text-neutral-700">参数管理</h3>
                            </div>
                            <i class="fa fa-chevron-right text-neutral-400"></i>
                        </div>
                        <p class="text-sm text-neutral-500 mb-4">配置组织级默认参数、业务参数和环境变量</p>
                        <div class="flex flex-wrap gap-2">
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">组织级默认参数</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">业务参数</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">环境变量</span>
                        </div>
                    </div>

                    <!-- 质量管理 -->
                    <div class="setting-card bg-white rounded-lg shadow-md p-6 cursor-pointer border-l-4 border-info" onclick="window.location.href='#quality'">
                        <div class="flex items-start justify-between mb-4">
                            <div class="flex items-center space-x-3">
                                <div class="w-10 h-10 bg-info/10 rounded-lg flex items-center justify-center text-info flex-shrink-0">
                                    <i class="fa fa-check-circle text-xl"></i>
                                </div>
                                <h3 class="text-lg font-semibold text-neutral-700">质量管理</h3>
                            </div>
                            <i class="fa fa-chevron-right text-neutral-400"></i>
                        </div>
                        <p class="text-sm text-neutral-500 mb-4">配置组织级质量门禁、代码规范和测试标准</p>
                        <div class="flex flex-wrap gap-2">
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">组织级质量门禁</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">代码规范</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">测试标准</span>
                        </div>
                    </div>

                    <!-- 工程管理 -->
                    <div class="setting-card bg-white rounded-lg shadow-md p-6 cursor-pointer border-l-4 border-primary" onclick="window.location.href='deployment_orchestration.html'">
                        <div class="flex items-start justify-between mb-4">
                            <div class="flex items-center space-x-3">
                                <div class="w-10 h-10 bg-primary/10 rounded-lg flex items-center justify-center text-primary flex-shrink-0">
                                    <i class="fa fa-cubes text-xl"></i>
                                </div>
                                <h3 class="text-lg font-semibold text-neutral-700">工程管理</h3>
                            </div>
                            <i class="fa fa-chevron-right text-neutral-400"></i>
                        </div>
                        <p class="text-sm text-neutral-500 mb-4">配置组织级流水线模板、代码仓库和构建部署</p>
                        <div class="flex flex-wrap gap-2">
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">组织级流水线模板</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">代码仓库</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">构建部署</span>
                        </div>
                    </div>

                    <!-- 安全管理 -->
                    <div class="setting-card bg-white rounded-lg shadow-md p-6 cursor-pointer border-l-4 border-danger" onclick="window.location.href='#security'">
                        <div class="flex items-start justify-between mb-4">
                            <div class="flex items-center space-x-3">
                                <div class="w-10 h-10 bg-danger/10 rounded-lg flex items-center justify-center text-danger flex-shrink-0">
                                    <i class="fa fa-shield text-xl"></i>
                                </div>
                                <h3 class="text-lg font-semibold text-neutral-700">安全管理</h3>
                            </div>
                            <i class="fa fa-chevron-right text-neutral-400"></i>
                        </div>
                        <p class="text-sm text-neutral-500 mb-4">配置平台安全策略、访问控制和安全架构</p>
                        <div class="flex flex-wrap gap-2">
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">安全策略</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">双因素认证</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">访问控制</span>
                        </div>
                    </div>

                    <!-- 环境管理 -->
                    <div class="setting-card bg-white rounded-lg shadow-md p-6 cursor-pointer border-l-4 border-success" onclick="window.location.href='#environment'">
                        <div class="flex items-start justify-between mb-4">
                            <div class="flex items-center space-x-3">
                                <div class="w-10 h-10 bg-success/10 rounded-lg flex items-center justify-center text-success flex-shrink-0">
                                    <i class="fa fa-server text-xl"></i>
                                </div>
                                <h3 class="text-lg font-semibold text-neutral-700">环境管理</h3>
                            </div>
                            <i class="fa fa-chevron-right text-neutral-400"></i>
                        </div>
                        <p class="text-sm text-neutral-500 mb-4">配置平台级开发、测试和生产环境</p>
                        <div class="flex flex-wrap gap-2">
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">开发环境</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">测试环境</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">生产环境</span>
                        </div>
                    </div>

                    <!-- 通知管理 -->
                    <div class="setting-card bg-white rounded-lg shadow-md p-6 cursor-pointer border-l-4 border-warning" onclick="window.location.href='#notification'">
                        <div class="flex items-start justify-between mb-4">
                            <div class="flex items-center space-x-3">
                                <div class="w-10 h-10 bg-warning/10 rounded-lg flex items-center justify-center text-warning flex-shrink-0">
                                    <i class="fa fa-bell text-xl"></i>
                                </div>
                                <h3 class="text-lg font-semibold text-neutral-700">通知管理</h3>
                            </div>
                            <i class="fa fa-chevron-right text-neutral-400"></i>
                        </div>
                        <p class="text-sm text-neutral-500 mb-4">配置平台通知公告和消息提醒机制</p>
                        <div class="flex flex-wrap gap-2">
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">通知公告</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">邮件通知</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">站内消息</span>
                        </div>
                    </div>

                    <!-- 功能点计算设置 -->
                    <div class="setting-card bg-white rounded-lg shadow-md p-6 cursor-pointer border-l-4 border-info" onclick="openFunctionPointModal()">
                        <div class="flex items-start justify-between mb-4">
                            <div class="flex items-center space-x-3">
                                <div class="w-10 h-10 bg-info/10 rounded-lg flex items-center justify-center text-info flex-shrink-0">
                                    <i class="fa fa-calculator text-xl"></i>
                                </div>
                                <h3 class="text-lg font-semibold text-neutral-700">功能点计算设置</h3>
                            </div>
                            <i class="fa fa-chevron-right text-neutral-400"></i>
                        </div>
                        <p class="text-sm text-neutral-500 mb-4">配置组织级功能点计算规则和权重参数</p>
                        <div class="flex flex-wrap gap-2">
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">计算方法</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">复杂度权重</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">转换因子</span>
                        </div>
                    </div>

                    <!-- 权限设置 -->
                    <div class="setting-card bg-white rounded-lg shadow-md p-6 cursor-pointer border-l-4 border-primary" onclick="window.location.href='teamManagement.html'">
                        <div class="flex items-start justify-between mb-4">
                            <div class="flex items-center space-x-3">
                                <div class="w-10 h-10 bg-primary/10 rounded-lg flex items-center justify-center text-primary flex-shrink-0">
                                    <i class="fa fa-user-circle text-xl"></i>
                                </div>
                                <h3 class="text-lg font-semibold text-neutral-700">权限设置</h3>
                            </div>
                            <i class="fa fa-chevron-right text-neutral-400"></i>
                        </div>
                        <p class="text-sm text-neutral-500 mb-4">配置角色管理与人员信息权限</p>
                        <div class="flex flex-wrap gap-2">
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">角色管理</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">人员信息</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">权限配置</span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 功能设置内容 -->
            <div id="content-feature" class="tab-content hidden">
                <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
                    <!-- 团队管理 -->
                    <div class="setting-card bg-white rounded-lg shadow-md p-6 cursor-pointer border-l-4 border-primary" onclick="window.location.href='#team'">
                        <div class="flex items-start justify-between mb-4">
                            <div class="flex items-center space-x-3">
                                <div class="w-10 h-10 bg-primary/10 rounded-lg flex items-center justify-center text-primary flex-shrink-0">
                                    <i class="fa fa-users text-xl"></i>
                                </div>
                                <h3 class="text-lg font-semibold text-neutral-700">团队管理</h3>
                            </div>
                            <i class="fa fa-chevron-right text-neutral-400"></i>
                        </div>
                        <p class="text-sm text-neutral-500 mb-4">启用/禁用团队协作功能和权限配置</p>
                        <div class="flex flex-wrap gap-2">
                            <span class="text-xs px-2 py-1 bg-success/10 text-success rounded-full">已启用</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">团队协作</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">角色权限</span>
                        </div>
                    </div>

                    <!-- 资产管理 -->
                    <div class="setting-card bg-white rounded-lg shadow-md p-6 cursor-pointer border-l-4 border-secondary" onclick="window.location.href='#assets'">
                        <div class="flex items-start justify-between mb-4">
                            <div class="flex items-center space-x-3">
                                <div class="w-10 h-10 bg-secondary/10 rounded-lg flex items-center justify-center text-secondary flex-shrink-0">
                                    <i class="fa fa-archive text-xl"></i>
                                </div>
                                <h3 class="text-lg font-semibold text-neutral-700">资产管理</h3>
                            </div>
                            <i class="fa fa-chevron-right text-neutral-400"></i>
                        </div>
                        <p class="text-sm text-neutral-500 mb-4">启用/禁用需求、设计、测试资产模块</p>
                        <div class="flex flex-wrap gap-2">
                            <span class="text-xs px-2 py-1 bg-success/10 text-success rounded-full">已启用</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">需求资产</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">设计资产</span>
                        </div>
                    </div>

                    <!-- 知识管理 -->
                    <div class="setting-card bg-white rounded-lg shadow-md p-6 cursor-pointer border-l-4 border-success" onclick="window.location.href='#knowledge'">
                        <div class="flex items-start justify-between mb-4">
                            <div class="flex items-center space-x-3">
                                <div class="w-10 h-10 bg-success/10 rounded-lg flex items-center justify-center text-success flex-shrink-0">
                                    <i class="fa fa-book text-xl"></i>
                                </div>
                                <h3 class="text-lg font-semibold text-neutral-700">知识管理</h3>
                            </div>
                            <i class="fa fa-chevron-right text-neutral-400"></i>
                        </div>
                        <p class="text-sm text-neutral-500 mb-4">启用/禁用文档管理、知识库功能</p>
                        <div class="flex flex-wrap gap-2">
                            <span class="text-xs px-2 py-1 bg-success/10 text-success rounded-full">已启用</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">文档管理</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">知识库</span>
                        </div>
                    </div>

                    <!-- 度量统计 -->
                    <div class="setting-card bg-white rounded-lg shadow-md p-6 cursor-pointer border-l-4 border-warning" onclick="window.location.href='#metrics'">
                        <div class="flex items-start justify-between mb-4">
                            <div class="flex items-center space-x-3">
                                <div class="w-10 h-10 bg-warning/10 rounded-lg flex items-center justify-center text-warning flex-shrink-0">
                                    <i class="fa fa-bar-chart text-xl"></i>
                                </div>
                                <h3 class="text-lg font-semibold text-neutral-700">度量统计</h3>
                            </div>
                            <i class="fa fa-chevron-right text-neutral-400"></i>
                        </div>
                        <p class="text-sm text-neutral-500 mb-4">启用/禁用度量指标、统计报表功能</p>
                        <div class="flex flex-wrap gap-2">
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">未启用</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">度量指标</span>
                            <span class="text-xs px-2 py-1 bg-neutral-100 text-neutral-600 rounded-full">报表模板</span>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 最近修改 -->
            <div class="bg-white rounded-lg shadow-md p-6 mt-6">
                <div class="flex justify-between items-center mb-4">
                    <h3 class="text-lg font-semibold text-neutral-700">最近修改</h3>
                    <button class="text-primary text-sm hover:underline">查看全部</button>
                </div>
                <div class="space-y-3">
                    <div class="flex items-start p-3 border border-neutral-200 rounded-md hover:bg-neutral-50">
                        <div class="w-8 h-8 rounded-full bg-primary/10 flex items-center justify-center text-primary mr-3">
                            <i class="fa fa-users"></i>
                        </div>
                        <div class="flex-1">
                            <div class="flex justify-between mb-1">
                                <h4 class="font-medium text-neutral-700 text-sm">团队成员权限调整</h4>
                                <span class="text-xs text-neutral-400">2小时前</span>
                            </div>
                            <p class="text-sm text-neutral-500">更新了开发团队的代码审核权限</p>
                        </div>
                    </div>
                    <div class="flex items-start p-3 border border-neutral-200 rounded-md hover:bg-neutral-50">
                        <div class="w-8 h-8 rounded-full bg-success/10 flex items-center justify-center text-success mr-3">
                            <i class="fa fa-server"></i>
                        </div>
                        <div class="flex-1">
                            <div class="flex justify-between mb-1">
                                <h4 class="font-medium text-neutral-700 text-sm">测试环境配置更新</h4>
                                <span class="text-xs text-neutral-400">1天前</span>
                            </div>
                            <p class="text-sm text-neutral-500">升级了测试环境的服务器配置</p>
                        </div>
                    </div>
                </div>
            </div>
        </main>
    </div>

    <!-- 功能点计算设置弹窗 -->
    <div id="function-point-modal" class="fixed inset-0 bg-black bg-opacity-50 z-50 flex items-center justify-center hidden">
        <div class="bg-white rounded-lg shadow-xl w-full max-w-4xl max-h-[90vh] overflow-y-auto m-4">
            <!-- 弹窗头部 -->
            <div class="bg-primary text-white px-6 py-4 flex items-center justify-between sticky top-0 z-10">
                <h2 class="text-xl font-bold flex items-center">
                    <i class="fa fa-calculator mr-2"></i>功能点计算设置
                </h2>
                <button onclick="closeFunctionPointModal()" class="text-white hover:text-gray-200 focus:outline-none">
                    <i class="fa fa-times text-xl"></i>
                </button>
            </div>
            
            <!-- 弹窗内容 -->
            <form id="function-point-form" class="p-6">
                <!-- 基本配置 -->
                <div class="mb-6">
                    <h3 class="text-lg font-semibold text-neutral-700 mb-4 flex items-center">
                        <i class="fa fa-cog text-primary mr-2"></i>基本配置
                    </h3>
                    
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                        <!-- 计算方法 -->
                        <div>
                            <label class="block text-sm font-medium text-neutral-700 mb-2">
                                计算方法 <span class="text-danger">*</span>
                            </label>
                            <select id="calculation-method" class="w-full px-3 py-2 border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary" required>
                                <option value="">-- 请选择 --</option>
                                <option value="ifpug" selected>IFPUG法</option>
                                <option value="cosmic">COSMIC法</option>
                                <option value="nesma">NESMA法</option>
                                <option value="custom">自定义方法</option>
                            </select>
                        </div>
                        
                        <!-- 计算粒度 -->
                        <div>
                            <label class="block text-sm font-medium text-neutral-700 mb-2">
                                计算粒度 <span class="text-danger">*</span>
                            </label>
                            <select id="calculation-granularity" class="w-full px-3 py-2 border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary" required>
                                <option value="story">用户故事</option>
                                <option value="requirement" selected>需求</option>
                                <option value="feature">功能特性</option>
                                <option value="module">模块</option>
                            </select>
                        </div>
                        
                        <!-- 基准功能点 -->
                        <div>
                            <label class="block text-sm font-medium text-neutral-700 mb-2">
                                基准功能点值
                            </label>
                            <input type="number" id="base-function-point" value="1.0" step="0.1" min="0.1" class="w-full px-3 py-2 border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary" placeholder="请输入基准值">
                        </div>
                        
                        <!-- 转换因子 -->
                        <div>
                            <label class="block text-sm font-medium text-neutral-700 mb-2">
                                人天转换因子
                            </label>
                            <input type="number" id="conversion-factor" value="8.0" step="0.5" min="1" class="w-full px-3 py-2 border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary" placeholder="1功能点=N人天">
                        </div>
                    </div>
                </div>
                
                <!-- 复杂度权重配置 -->
                <div class="mb-6">
                    <h3 class="text-lg font-semibold text-neutral-700 mb-4 flex items-center">
                        <i class="fa fa-balance-scale text-primary mr-2"></i>复杂度权重配置
                    </h3>
                    
                    <div class="bg-neutral-50 rounded-lg p-4 space-y-4">
                        <!-- 低复杂度 -->
                        <div>
                            <div class="flex justify-between items-center mb-2">
                                <label class="text-sm font-medium text-neutral-700">
                                    低复杂度权重
                                </label>
                                <span id="low-weight-value" class="text-sm font-semibold text-primary">1.0</span>
                            </div>
                            <input type="range" id="low-weight" min="0.5" max="2.0" step="0.1" value="1.0" class="w-full h-2 bg-neutral-200 rounded-lg appearance-none cursor-pointer slider" oninput="updateWeightValue('low')">
                            <div class="flex justify-between text-xs text-neutral-500 mt-1">
                                <span>0.5</span>
                                <span>2.0</span>
                            </div>
                        </div>
                        
                        <!-- 中复杂度 -->
                        <div>
                            <div class="flex justify-between items-center mb-2">
                                <label class="text-sm font-medium text-neutral-700">
                                    中复杂度权重
                                </label>
                                <span id="medium-weight-value" class="text-sm font-semibold text-primary">1.5</span>
                            </div>
                            <input type="range" id="medium-weight" min="0.5" max="3.0" step="0.1" value="1.5" class="w-full h-2 bg-neutral-200 rounded-lg appearance-none cursor-pointer slider" oninput="updateWeightValue('medium')">
                            <div class="flex justify-between text-xs text-neutral-500 mt-1">
                                <span>0.5</span>
                                <span>3.0</span>
                            </div>
                        </div>
                        
                        <!-- 高复杂度 -->
                        <div>
                            <div class="flex justify-between items-center mb-2">
                                <label class="text-sm font-medium text-neutral-700">
                                    高复杂度权重
                                </label>
                                <span id="high-weight-value" class="text-sm font-semibold text-primary">2.5</span>
                            </div>
                            <input type="range" id="high-weight" min="1.0" max="5.0" step="0.1" value="2.5" class="w-full h-2 bg-neutral-200 rounded-lg appearance-none cursor-pointer slider" oninput="updateWeightValue('high')">
                            <div class="flex justify-between text-xs text-neutral-500 mt-1">
                                <span>1.0</span>
                                <span>5.0</span>
                            </div>
                        </div>
                    </div>
                </div>
                
                <!-- 调整因子配置 -->
                <div class="mb-6">
                    <h3 class="text-lg font-semibold text-neutral-700 mb-4 flex items-center">
                        <i class="fa fa-sliders text-primary mr-2"></i>调整因子配置
                    </h3>
                    
                    <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
                        <!-- 技术难度系数 -->
                        <div>
                            <label class="block text-sm font-medium text-neutral-700 mb-2">
                                技术难度系数
                            </label>
                            <input type="number" id="tech-difficulty" value="1.0" step="0.05" min="0.5" max="2.0" class="w-full px-3 py-2 border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary" placeholder="0.5 - 2.0">
                        </div>
                        
                        <!-- 业务复杂度系数 -->
                        <div>
                            <label class="block text-sm font-medium text-neutral-700 mb-2">
                                业务复杂度系数
                            </label>
                            <input type="number" id="business-complexity" value="1.0" step="0.05" min="0.5" max="2.0" class="w-full px-3 py-2 border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary" placeholder="0.5 - 2.0">
                        </div>
                        
                        <!-- 团队熟练度系数 -->
                        <div>
                            <label class="block text-sm font-medium text-neutral-700 mb-2">
                                团队熟练度系数
                            </label>
                            <input type="number" id="team-maturity" value="1.0" step="0.05" min="0.8" max="1.5" class="w-full px-3 py-2 border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary" placeholder="0.8 - 1.5">
                        </div>
                        
                        <!-- 重用性系数 -->
                        <div>
                            <label class="block text-sm font-medium text-neutral-700 mb-2">
                                重用性系数
                            </label>
                            <input type="number" id="reusability" value="0.9" step="0.05" min="0.5" max="1.0" class="w-full px-3 py-2 border border-neutral-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary/30 focus:border-primary" placeholder="0.5 - 1.0">
                        </div>
                    </div>
                </div>
                
                <!-- 启用选项 -->
                <div class="mb-6">
                    <h3 class="text-lg font-semibold text-neutral-700 mb-4 flex items-center">
                        <i class="fa fa-toggle-on text-primary mr-2"></i>功能选项
                    </h3>
                    
                    <div class="space-y-3">
                        <div class="flex items-center">
                            <input type="checkbox" id="auto-calculate" checked class="w-4 h-4 text-primary bg-neutral-100 border-neutral-300 rounded focus:ring-primary/30">
                            <label for="auto-calculate" class="ml-2 text-sm text-neutral-700">启用自动计算（需求创建后自动计算功能点）</label>
                        </div>
                        <div class="flex items-center">
                            <input type="checkbox" id="manual-adjust" checked class="w-4 h-4 text-primary bg-neutral-100 border-neutral-300 rounded focus:ring-primary/30">
                            <label for="manual-adjust" class="ml-2 text-sm text-neutral-700">允许手动调整（允许用户手动修改计算结果）</label>
                        </div>
                        <div class="flex items-center">
                            <input type="checkbox" id="historical-reference" class="w-4 h-4 text-primary bg-neutral-100 border-neutral-300 rounded focus:ring-primary/30">
                            <label for="historical-reference" class="ml-2 text-sm text-neutral-700">启用历史数据参考（基于历史项目优化计算）</label>
                        </div>
                        <div class="flex items-center">
                            <input type="checkbox" id="ai-optimization" class="w-4 h-4 text-primary bg-neutral-100 border-neutral-300 rounded focus:ring-primary/30">
                            <label for="ai-optimization" class="ml-2 text-sm text-neutral-700">启用AI智能优化（使用机器学习优化计算结果）</label>
                        </div>
                    </div>
                </div>
                
                <!-- 计算示例 -->
                <div class="mb-6 bg-info/5 border border-info/20 rounded-lg p-4">
                    <h4 class="text-sm font-semibold text-neutral-700 mb-3 flex items-center">
                        <i class="fa fa-lightbulb-o text-info mr-2"></i>计算示例
                    </h4>
                    <div class="text-sm text-neutral-600 space-y-1">
                        <p><strong>公式：</strong>功能点 = 基准值 × 复杂度权重 × 技术难度 × 业务复杂度 × 团队熟练度 × 重用性</p>
                        <p><strong>示例：</strong>中复杂度需求 = 1.0 × 1.5 × 1.0 × 1.0 × 1.0 × 0.9 = 1.35 功能点</p>
                        <p><strong>人天转换：</strong>1.35 × 8.0 = 10.8 人天</p>
                    </div>
                </div>
                
                <!-- 底部按钮 -->
                <div class="flex justify-end space-x-3 pt-4 border-t border-neutral-200">
                    <button type="button" onclick="closeFunctionPointModal()" class="px-6 py-2 border border-neutral-300 rounded-lg text-sm hover:bg-neutral-50 transition-all">
                        取消
                    </button>
                    <button type="button" onclick="resetFunctionPointSettings()" class="px-6 py-2 border border-primary text-primary rounded-lg text-sm hover:bg-primary/5 transition-all">
                        <i class="fa fa-refresh mr-1"></i>重置默认值
                    </button>
                    <button type="submit" class="px-6 py-2 bg-primary text-white rounded-lg text-sm hover:bg-primary/90 transition-all">
                        <i class="fa fa-check mr-1"></i>保存设置
                    </button>
                </div>
            </form>
        </div>
    </div>

    <!-- JavaScript -->
    <script>
        // Tab切换功能
        function switchTab(tabName) {
            // 隐藏所有tab内容
            document.querySelectorAll('.tab-content').forEach(content => {
                content.classList.add('hidden');
            });
            
            // 移除所有tab按钮的活动状态
            document.querySelectorAll('.tab-button').forEach(button => {
                button.classList.remove('text-primary', 'border-b-2', 'border-primary', 'bg-primary/5');
                button.classList.add('text-neutral-600');
            });
            
            // 显示当前tab内容
            document.getElementById('content-' + tabName).classList.remove('hidden');
            
            // 激活当前tab按钮
            const activeButton = document.getElementById('tab-' + tabName);
            activeButton.classList.remove('text-neutral-600');
            activeButton.classList.add('text-primary', 'border-b-2', 'border-primary', 'bg-primary/5');
        }
        
        // 页面加载时默认显示全局设置
        document.addEventListener('DOMContentLoaded', function() {
            switchTab('global');
        });
        
        // 功能点计算设置相关功能
        
        // 打开功能点设置弹窗
        function openFunctionPointModal() {
            document.getElementById('function-point-modal').classList.remove('hidden');
            document.body.style.overflow = 'hidden';
            loadFunctionPointSettings();
        }
        
        // 关闭功能点设置弹窗
        function closeFunctionPointModal() {
            document.getElementById('function-point-modal').classList.add('hidden');
            document.body.style.overflow = 'auto';
        }
        
        // 更新权重值显示
        function updateWeightValue(type) {
            const value = document.getElementById(type + '-weight').value;
            document.getElementById(type + '-weight-value').textContent = value;
        }
        
        // 加载保存的设置
        function loadFunctionPointSettings() {
            const savedSettings = localStorage.getItem('functionPointSettings');
            if (savedSettings) {
                const settings = JSON.parse(savedSettings);
                
                // 恢复基本配置
                if (settings.calculationMethod) document.getElementById('calculation-method').value = settings.calculationMethod;
                if (settings.calculationGranularity) document.getElementById('calculation-granularity').value = settings.calculationGranularity;
                if (settings.baseFunctionPoint) document.getElementById('base-function-point').value = settings.baseFunctionPoint;
                if (settings.conversionFactor) document.getElementById('conversion-factor').value = settings.conversionFactor;
                
                // 恢复复杂度权重
                if (settings.lowWeight) {
                    document.getElementById('low-weight').value = settings.lowWeight;
                    updateWeightValue('low');
                }
                if (settings.mediumWeight) {
                    document.getElementById('medium-weight').value = settings.mediumWeight;
                    updateWeightValue('medium');
                }
                if (settings.highWeight) {
                    document.getElementById('high-weight').value = settings.highWeight;
                    updateWeightValue('high');
                }
                
                // 恢复调整因子
                if (settings.techDifficulty) document.getElementById('tech-difficulty').value = settings.techDifficulty;
                if (settings.businessComplexity) document.getElementById('business-complexity').value = settings.businessComplexity;
                if (settings.teamMaturity) document.getElementById('team-maturity').value = settings.teamMaturity;
                if (settings.reusability) document.getElementById('reusability').value = settings.reusability;
                
                // 恢复功能选项
                if (settings.autoCalculate !== undefined) document.getElementById('auto-calculate').checked = settings.autoCalculate;
                if (settings.manualAdjust !== undefined) document.getElementById('manual-adjust').checked = settings.manualAdjust;
                if (settings.historicalReference !== undefined) document.getElementById('historical-reference').checked = settings.historicalReference;
                if (settings.aiOptimization !== undefined) document.getElementById('ai-optimization').checked = settings.aiOptimization;
            }
        }
        
        // 重置为默认值
        function resetFunctionPointSettings() {
            if (confirm('确定要重置为默认值吗？')) {
                document.getElementById('calculation-method').value = 'ifpug';
                document.getElementById('calculation-granularity').value = 'requirement';
                document.getElementById('base-function-point').value = '1.0';
                document.getElementById('conversion-factor').value = '8.0';
                
                document.getElementById('low-weight').value = '1.0';
                document.getElementById('medium-weight').value = '1.5';
                document.getElementById('high-weight').value = '2.5';
                updateWeightValue('low');
                updateWeightValue('medium');
                updateWeightValue('high');
                
                document.getElementById('tech-difficulty').value = '1.0';
                document.getElementById('business-complexity').value = '1.0';
                document.getElementById('team-maturity').value = '1.0';
                document.getElementById('reusability').value = '0.9';
                
                document.getElementById('auto-calculate').checked = true;
                document.getElementById('manual-adjust').checked = true;
                document.getElementById('historical-reference').checked = false;
                document.getElementById('ai-optimization').checked = false;
                
                showNotification('已重置为默认值', 'success');
            }
        }
        
        // 表单验证
        function validateFunctionPointForm() {
            const method = document.getElementById('calculation-method').value;
            const granularity = document.getElementById('calculation-granularity').value;
            const basePoint = parseFloat(document.getElementById('base-function-point').value);
            const conversionFactor = parseFloat(document.getElementById('conversion-factor').value);
            
            if (!method) {
                showNotification('请选择计算方法', 'error');
                return false;
            }
            
            if (!granularity) {
                showNotification('请选择计算粒度', 'error');
                return false;
            }
            
            if (isNaN(basePoint) || basePoint < 0.1) {
                showNotification('基准功能点值不能小于0.1', 'error');
                return false;
            }
            
            if (isNaN(conversionFactor) || conversionFactor < 1) {
                showNotification('转换因子不能小于1', 'error');
                return false;
            }
            
            return true;
        }
        
        // 保存设置
        function saveFunctionPointSettings() {
            const settings = {
                calculationMethod: document.getElementById('calculation-method').value,
                calculationGranularity: document.getElementById('calculation-granularity').value,
                baseFunctionPoint: document.getElementById('base-function-point').value,
                conversionFactor: document.getElementById('conversion-factor').value,
                lowWeight: document.getElementById('low-weight').value,
                mediumWeight: document.getElementById('medium-weight').value,
                highWeight: document.getElementById('high-weight').value,
                techDifficulty: document.getElementById('tech-difficulty').value,
                businessComplexity: document.getElementById('business-complexity').value,
                teamMaturity: document.getElementById('team-maturity').value,
                reusability: document.getElementById('reusability').value,
                autoCalculate: document.getElementById('auto-calculate').checked,
                manualAdjust: document.getElementById('manual-adjust').checked,
                historicalReference: document.getElementById('historical-reference').checked,
                aiOptimization: document.getElementById('ai-optimization').checked
            };
            
            localStorage.setItem('functionPointSettings', JSON.stringify(settings));
            showNotification('设置保存成功！', 'success');
            
            setTimeout(() => {
                closeFunctionPointModal();
            }, 1000);
        }
        
        // 显示通知
        function showNotification(message, type = 'info') {
            const colors = {
                success: 'bg-success',
                error: 'bg-danger',
                info: 'bg-info',
                warning: 'bg-warning'
            };
            
            const notification = document.createElement('div');
            notification.className = `fixed top-20 right-4 ${colors[type]} text-white px-6 py-3 rounded-lg shadow-lg z-[60] transition-all transform translate-x-0`;
            notification.innerHTML = `
                <div class="flex items-center space-x-2">
                    <i class="fa fa-${type === 'success' ? 'check-circle' : type === 'error' ? 'exclamation-circle' : 'info-circle'}"></i>
                    <span>${message}</span>
                </div>
            `;
            
            document.body.appendChild(notification);
            
            setTimeout(() => {
                notification.style.transform = 'translateX(400px)';
                setTimeout(() => {
                    document.body.removeChild(notification);
                }, 300);
            }, 3000);
        }
        
        // 表单提交事件
        document.addEventListener('DOMContentLoaded', function() {
            const form = document.getElementById('function-point-form');
            if (form) {
                form.addEventListener('submit', function(e) {
                    e.preventDefault();
                    if (validateFunctionPointForm()) {
                        saveFunctionPointSettings();
                    }
                });
            }
        });
        
        // ESC键关闭弹窗
        document.addEventListener('keydown', function(e) {
            if (e.key === 'Escape') {
                const modal = document.getElementById('function-point-modal');
                if (modal && !modal.classList.contains('hidden')) {
                    closeFunctionPointModal();
                }
            }
        });
        
        // 设计管理菜单展开/收起功能
        document.addEventListener('DOMContentLoaded', function() {
            const designMenuToggle = document.getElementById('design-menu-toggle');
            const designSubmenu = document.getElementById('design-submenu');
            const designMenuWrapper = document.querySelector('.design-menu-wrapper');
            
            if (designMenuToggle && designSubmenu) {
                designMenuToggle.addEventListener('click', function(e) {
                    e.stopPropagation();
                    this.querySelector('i').classList.toggle('rotate-90');
                    if (designSubmenu.classList.contains('hidden')) {
                        designSubmenu.classList.remove('hidden');
                        setTimeout(() => {
                            designSubmenu.classList.remove('opacity-0');
                        }, 10);
                    } else {
                        designSubmenu.classList.add('opacity-0');
                        setTimeout(() => {
                            designSubmenu.classList.add('hidden');
                        }, 300);
                    }
                });
                
                // 点击菜单项外部区域收起菜单
                document.addEventListener('click', function(e) {
                    if (designMenuWrapper && !designMenuWrapper.contains(e.target)) {
                        designSubmenu.classList.add('opacity-0');
                        setTimeout(() => {
                            designSubmenu.classList.add('hidden');
                        }, 300);
                        if (designMenuToggle.querySelector('i')) {
                            designMenuToggle.querySelector('i').classList.remove('rotate-90');
                        }
                    }
                });
            }
            
            // 测试管理菜单展开/收起功能
            const testMenuToggle = document.getElementById('test-menu-toggle');
            const testSubmenu = document.getElementById('test-submenu');
            const testMenuWrapper = document.querySelector('.test-menu-wrapper');
            
            if (testMenuToggle && testSubmenu) {
                testMenuToggle.addEventListener('click', function(e) {
                    e.stopPropagation();
                    this.querySelector('i').classList.toggle('rotate-90');
                    if (testSubmenu.classList.contains('hidden')) {
                        testSubmenu.classList.remove('hidden');
                        setTimeout(() => {
                            testSubmenu.classList.remove('opacity-0');
                        }, 10);
                    } else {
                        testSubmenu.classList.add('opacity-0');
                        setTimeout(() => {
                            testSubmenu.classList.add('hidden');
                        }, 300);
                    }
                });
                
                // 点击菜单项外部区域收起菜单
                document.addEventListener('click', function(e) {
                    if (testMenuWrapper && !testMenuWrapper.contains(e.target)) {
                        testSubmenu.classList.add('opacity-0');
                        setTimeout(() => {
                            testSubmenu.classList.add('hidden');
                        }, 300);
                        if (testMenuToggle.querySelector('i')) {
                            testMenuToggle.querySelector('i').classList.remove('rotate-90');
                        }
                    }
                });
            }
        });
    </script>
</body>
</html>
